<!DOCTYPE html>
<html lang="en">

<head>
    <meta http-equiv="Content-Type" content="text/html;charset=utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <link rel="shortcut icon" href="http://www.hefatong.com/img/favicon.ico" type="image/x-icon">
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width,initial-scale=1,maximum-scale=1,user-scalable=no">
    <title>管理员</title>
    <link rel="stylesheet" href="http://www.hefatong.com/css/admin.css">
</head>

<body>
    <div class="login-form">
        <div class="close"> </div>
        <div class="head-info">
            <label class="lbl-1"> </label>
            <label class="lbl-2"> </label>
            <label class="lbl-3"> </label>
        </div>
        <div class="clear"> </div>
        <div class="avtar">
            <img src="http://www.hefatong.com/img/admin/avtar.png" />
    </div>
            <form>
                <input id="name" type="text" class="text" placeholder="name">
                <div class="key">
                    <input id="psd" type="password" placeholder="password">
                </div>
            </form>
            <div class="signin">
                <input type="submit" value="Login" id="submit">
            </div>
        </div>
        <script src="http://apps.bdimg.com/libs/jquery/2.1.4/jquery.min.js"></script>
        <script type="text/javascript">
            $(function(){
                $('#submit').on('click', function(){
                    $.ajax({
                        url:'http://www.hefatong.com/account/login',
                        type: 'post',
                        data: {
                            account:$('#name').val(),
                            password:$('#psd').val()
                        },
                        success: function(data) {
                            var d = JSON.parse(data);

                            if(d.code === 200){
                                window.location.href = 'http://www.hefatong.com/querylist/'+Date.now();
                            }else{
                                alert(d.message);
                            }
                        },
                        error: function(err){
                            alert('网络错误!');
                        }
                    });
                })
            });
        </script>
</body>

</html>